import request from '@/utils/request'

// 查询产品对比库列表
export function listCompare(query) {
    return request({
        url: '/product/compare/list',
        method: 'get',
        params: query
    })
}

// 查询产品对比库详细
export function getCompare(id) {
    return request({
        url: '/product/compare/' + id,
        method: 'get'
    })
}

// 新增产品对比库
export function addCompare(data) {
    return request({
        url: '/product/compare',
        method: 'post',
        data: data
    })
}

// 修改产品对比库
export function updateCompare(data) {
    return request({
        url: '/product/compare',
        method: 'put',
        data: data
    })
}

export function enable(data) {
    return request({
        url: '/product/compare/enable',
        method: 'post',
        data: data
    })
}

// 删除产品对比库
export function delCompare(id) {
    return request({
        url: '/product/compare/' + id,
        method: 'delete'
    })
}
